package com.xcity.pomelo.response;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.xcity.game.item.ItemInfo;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class AdventureAttackResponse extends Response {

	public byte result; // 1-命中,0-未命中
	public List<ItemInfo> items = Collections.emptyList(); // 奖励物品
	
	public AdventureAttackResponse(int serial, boolean isHit, ItemInfo item) {
		super(serial);
		this.result = (byte) (isHit ? 1 : 0);
		if (item != null) {
			items = new ArrayList<>(1);
			items.add(item);
		}
	}

}
